const Layout = () => import(/* webpackChunkName: "home" */ "@/views/layout.vue");

// 客户管理
const ClientManager = () => import(/* webpackChunkName: "client" */ "@/views/client/clientManager");
// 客户详情
const ClientInfo = () => import(/* webpackChunkName: "client" */ "@/views/client/clientInfo");

// 工程管理
const EngineeringManager = () => import(/* webpackChunkName: "client" */ "@/views/client/engineeringManager");

// 整改管理
const RectificationManager = () => import(/* webpackChunkName: "client" */ "@/views/client/rectificationManager");

// 流失客户
const ClientLose = () => import(/* webpackChunkName: "home" */ "@/views/loseClient/clientLose");
// 流失客户详情
const clientLoseInfo = () => import(/* webpackChunkName: "home" */ "@/views/loseClient/clientLoseInfo");

// 客户分组
const ClientGroup = () => import(/* webpackChunkName: "home" */ "@/views/clientGroup");

// 分配
const Distribution = () => import(/* webpackChunkName: "home" */ "@/views/distribution");

// 任务管理
const TaskManager = () => import(/* webpackChunkName: "home" */ "@/views/taskManager");
// 创建售后单
const AfterSalesOrder = () => import(/* webpackChunkName: "home" */ "@/views/afterSalesOrder/afterSalesOrderAdd/index.vue");
const AfterSalesOrderDetails = () =>
  import(/* webpackChunkName: "home" */ "@/views/afterSalesOrder/afterSalesOrderDetails/index.vue");
// 判责管理
const JudgmentList = () => import("@/views/judgment/judgmentList/index.vue");
// 判责
const judgmentAdd = () => import("@/views/judgment/judgmentAdd/index.vue");
// 判责
const judgmentDetails = () => import("@/views/judgment/judgmentDetails/index.vue");
export default [
  {
    path: "/",
    name: "home",
    component: Layout,
    redirect: "/client-manager",
    children: [
      {
        path: "/client-manager",
        name: "clientManager",
        component: ClientManager,
        meta: {
          title: "客户管理",
          keepAlive: true
        }
      },
      // 已经独立为子应用，暂时保留
      // {
      //   path: "/engineering-manager",
      //   name: "engineeringManager",
      //   component: EngineeringManager,
      //   meta: {
      //     title: "工程管理",
      //     keepAlive: true
      //   }
      // },
      {
        path: "/rectification-manager",
        name: "rectificationManager",
        component: RectificationManager,
        meta: {
          title: "售后管理",
          keepAlive: true
        }
      },
      {
        path: "/judgment-list",
        name: "JudgmentList",
        component: JudgmentList,
        meta: {
          title: "判责管理",
          keepAlive: true
        }
      },
      {
        path: "/judgment-details",
        name: "judgmentDetails",
        component: judgmentDetails,
        meta: {
          title: "判责详情",
          keepAlive: true
        }
      },
      {
        path: "/judgment-add",
        name: "judgmentAdd",
        component: judgmentAdd,
        meta: {
          title: "新增判责",
          keepAlive: true
        }
      },
      {
        path: "/client-info",
        name: "clientInfo",
        component: ClientInfo,
        meta: {
          title: "客户详情"
        }
      },
      {
        path: "/client-lose",
        name: "clientLose",
        component: ClientLose,
        meta: {
          keepAlive: true,
          title: "流失客户"
        }
      },
      {
        path: "/client-lose-info",
        name: "clientLoseInfo",
        component: clientLoseInfo,
        meta: {
          title: "流失客户详情"
        }
      },
      {
        path: "/client-group",
        name: "clientGroup",
        component: ClientGroup,
        meta: {
          title: "客户分组",
          keepAlive: true
        }
      },
      {
        name: "distribution",
        path: "/distribution",
        component: Distribution,
        meta: {
          title: "分配"
        }
      },
      {
        name: "taskManager",
        path: "/task-manager",
        component: TaskManager,
        meta: {
          title: "任务管理"
        }
      },
      {
        name: "afterSalesOrder",
        path: "/after-sales-order",
        component: AfterSalesOrder,
        meta: {
          title: "施工计划"
        }
      },
      {
        name: "afterSalesOrderDetail",
        path: "/after-sales-order-detail",
        component: AfterSalesOrderDetails,
        meta: {
          title: "售后详情"
        }
      }
    ]
  }
];
